package com.logistics.role.entity.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;

import com.baomidou.mybatisplus.annotation.TableName;
import com.logistics.role.entity.model.RoleMenuSave;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * 
 * </p>
 *
 * @author zhiyu.fan
 * @since 2024-05-14
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("sys_role_menu")
public class RoleMenu implements Serializable {

    private static final long serialVersionUID = 1L;

      @TableId(value = "id", type = IdType.AUTO)
      private Integer id;

    private Integer roleId;

    private Integer menuId;

    public RoleMenu(){

    }

    public RoleMenu(RoleMenuSave save){
        this.roleId = save.getRoleId();
        this.menuId = save.getMenuId();
    }


    public static RoleMenu build(RoleMenuSave save){
        return new RoleMenu(save);
    }
}
